import $http from "./request"
import axios from "axios";
axios.defaults.post
// 用户登录(账号密码)
export const userlogin = function (data){
    return axios({
        method:"post",
        url:"/user/userlogin",
        data:data
    })
}

// 获取用户列表

export const userlist = function (){
    return axios({
        method:"get",
        url:"/user/userlist",
    })
}

// 获取邮箱验证码

export const getEmailCode = function (data){
    return axios({
        method:"post",
        url:"/user/getemailcode",
        data:data,
    })
}

// 邮箱验证码登录接口

export const loginByEmail = function (data){
    return axios({
        method:"post",
        url:"/user/loginbyemail",
        data:data,
    })
}

// 删除用户

export const delUser = function (data){
    return axios({
        method:"post",
        url:"/user/deluser",
        data: {
            username:data
        },
    })
}


